package data;
public class Meeting {

	private String weekday;
	private int startTime;
	private int endTime;

	public Meeting(String weekday, String startTime, String endTime) {
		this.weekday = weekday;
		String[] temp = startTime.split(":");
		this.startTime = Integer.parseInt(temp[0]) * 100
				+ Integer.parseInt(temp[1]);
		temp = endTime.split(":");
		this.endTime = Integer.parseInt(temp[0]) * 100
				+ Integer.parseInt(temp[1]);
	}

	public boolean overlap(Meeting m) {
		if (this.weekday.equals(m.weekday)) {
			if (this.startTime < m.endTime && this.endTime > m.startTime) {
				return true;
			}
		}
		return false;
	}
}
